package vn.codespot.hms.task;

import vn.codespot.hms.model.request.ConfirmRequestModel;
import vn.codespot.hms.model.response.ConfirmResponseModel;
import android.content.Context;

public class ConfirmTask extends AbstractTask {
    private ITaskListener mListener;

    private ConfirmRequestModel mReq;

    private ConfirmResponseModel mResp;

    public ConfirmTask(Context context, ITaskListener listener, ConfirmRequestModel request) {
        super(context, "Confirm visa", "Cancel applying visa");
        mListener = listener;
        mReq = request;
    }

    @Override
    protected void executes() {
        mResp = mService.postConfirm(mReq);
    }

    @Override
    protected void finish() {
        mListener.finish(mResp);
    }
}
